home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 31
/
Aminet 31 (1999)(Schatztruhe)[!][Jun 1999].iso
/
Aminet
/
util
/
boot
/
ForcePal.lha
/
ForcePal.doc
< prev
next >
Wrap
Text File
|
1998-02-13
|
14KB
|
342 lines
ForcePal Documentation
----------------------
Author: Ron Hackett
EMail: CC600750@ntu.ac.uk (till 2000ad)
Snail: 12 Mount Pleasent
Golden Bank
Falmount
Cornwall
UK
TR11 5BW
Revision: 1.0ß
Date: 08/12/97
Release: CardWare/EMailWare/FreeWare
DocVer: 1
DocAuthor:Ron Hackett
Document Contentce
------------------
Introduction
Features (Why ForcePal)
Requirements
Installation
Operation/Use
Definition of a Prefs file
Unintended Features
To Do
Legal
Author
Introduction
------------
ForcePal is a utility to ensure that you know what palette your system is
using, at least at start up time. I havn't included any code to lock these
colours or force them to stay this colour, all I can say is that I've been
using it for several months now and nothing has attempted to change the
colours ForcePal sets up. The only trouble I have is if the Workbench screen
is closed and re-opened again. Why? ForcePal is not a resident program and
sould therefore be run each time the Workbench screen is opened.
This current version of ForcePal (1.0ß) and it's documentation are still
very much in the form of a beta. Notice the source comments that it will
probably crash the system if some idiot tries to give it an icon and run it
from Workbench. This is because it is a CLI program and expects to recieve
some form of command line parameters. (even if they are empty it should just
recieve a null) This means it should work from IconX, IconJ, DoIcon or the
Execute Command Menu option from Wrokbench. Just don't give it a Tool Icon!
It can of course be launched from a Dock or menu enhancer as long as the
environment emulation for that option is set to CLI NOT WORKBENCH. Infact I
havn't been stupid enough to try running it from Workbench yet but I've seen
the results of other previous experiments and they wern't pretty!
Features (Why ForcePal)
-----------------------
- CLI based
- Non detatchable
- Small
- Accepts command parameters
- Preferance file in ASCII
- No resident portion
- Terminates almost instantly
- Performs NO colour locking
- Version String *** NEW for V1.0ß*** :-)
This means it works very well with NewIcons and very badly with MUI, sorry.
See to do.
Requirements
------------
As far as I know you will need an Amiga or Amiga Compatible computer. And
that's about it. It should run under Amiga OS 1.3, maby even 1.2 but I
don't have the later and the former is back at home, Will check at
Christmas.
Installation
------------
Well it's a CLI utility isn't it. I segest sticking it in `c:' or somewhere
else in your PATH. I use `system:xc' which is c: with `system:c' ADDed to
it. I run it from `s:Startup-sequence' before and after LoadWB ensureing
the palette is set up when Workbench starts and pushing the colours back if
it has tried to change anything.
Operation/Use
-------------
I recomend that it is placed late in your s:startup-sequence or
s:user-startup. How late...? Considerably later than IPrefs for aesthetic
reasonning. Why...? ForcePal has to temporarily open a Window on the
Workbench screen, to link it's palette with that of the Workbench, this will
open the Workbench screen. Don't worry you won't ever notice this window,
it's exactly 1 pixel in size and sits right up in the top left hand corner of
the screen for only a fraction of a second.
By default (and having done only this) ForcePal will simply patch the second
4 colours (those from 4 to 7) to resemble the MagicWorkbench palette. Some
may say this is an essential enough task and of course quite necessary but
this was not the only intention. Even in the early days when this program
was called ForceMWBPal it was asspiring to be so much more. (When I could
get round to coding it) It now features a symple prefs file (prefs editor to
be coded in near future, don't go you can get by without) in ASCII format
stored (by default) in the s: assign so it dosen't take up RAM: in ENV: and
a set of two (yes kids you heard it hear first TWO) command line parameters!
Please bare in mind that these command line parameters are the most recent
additions to ForcePal and are likely to be a little unstable. Notealby these
parameters must be issued (or not, as the case may be) in the correct order!
They are:-
-NOMWB!!!
This increadable feature enables you NOT to set the MagicWorkbench
Palette with ForcePal. The bonous feature of this is that if you have no
Prefs file... ForcePal dose absoulutly nothing at all. (Except open a window,
waste some processor time, close a window and take up room on your hard disk)
:-)
<filename>
With this cunning feature you can specify a different Prefs file from
the default one. But wait that's not all. If ForcePal couldn't find your
specified Prefs file... It uses the default Prefs file!!!(Raptuious applause)
This of cource means you can have lots of different palettes set up and use
different ones for different moods! combined with something like RandomFile
you could even have a different palette every time you boot. A predominantly
blue one one day and a predominently green one the next for instance. I
hasten to add that I have never been so gross as to attempt this and I guess
that even without this feature one could get round the problem. But for me
it dose enable me to set up the palette for Iconographics when I'm in
Iconographics dominated directories, MagicWorkench, UberBench, FreshIcons
etc. BTW I recently noticed that the FreshIcon Palette only differs from the
Acorn Risc OS 16 colour palette in respect of two colours and the positions!
Cool huh?
Full Command Spec:-
ForcePal [[-NOMWB] <PrefsFile>]
Definition of a Prefs file
--------------------------
The default prefs file should be s:ForcePal.Prefs and contain any number of
lines. On each line should be four numbers seperated by commas. There MUST
be no blank lines and as yet comments are NOT supported. The first number is
the position at which the colour is to be set. The remaining four are an 8
bit decimal number refering to the gun intencity of the red, green, and blue
attributes of that position in the CLUT. eg.
0,170,170,170
1,0,0,0
2,255,255,255
Will force the first three colours to be their default colours as set in the
Kickstart from 2.04 onwards. Grey, black and white. For maximum blue in the
fourth colour:-
3,0,0,255
red:-
3,255,0,0
for Green:-
3,0,255,0
and so on. Another stunning advantage of this program is that you can set
the colours of the upper end of your palette by appending a minus `-'. If
you had an 8 plane Workbench (256 colours) and had a line:-
-1,255,255,0
then colour number 255 would be bright yellow. This would not be very
advantagious as the OS sets the top 4 colours but you could set
-5,255,255,0
and this will set the first colour below the top four that the OS sets to be
bright yellow. This means of course that if you decrease your Workbench
colours to 64 colour 59 will be set to bright yellow instead of colour 251.
To Do
-----
It may be that I don't do anything else with this 1.0ß may well be the only
released version. Espesially if I get no responses. However it is running
in my system and I have a few ideas. In order of priority.
- Remove any bugs people find!?
- Add Prefs Program
- Improve Parameter Parsing
- Add `?' Parameter
- Add Comment Recognition in Prefs file
- Test and add Workbench compatability
Tool Types instead of parameters etc
- Add OPTIONAL Colour Locking
Unintended features
-------------------
MUI programs opened on the Workbench screen mess the palette up something
cronic.
I havn't had any crashes for ages. Thigs I would say will stuff ForcePal
up goo and proper would include giving funny parameters to it like:-
ForcePal ?
Seems sencible enough, it'll probably look for a file called ? as its
prefs and go belly up coz it can't find it. Giving strange lines in the
Prefs file will freak it out for sure. It reads 4 ASCII numbers from the
file at a time delimited by a <LF> or a comma `,' so
0
0
0
0
and
0
0,0,0
and
0,0,0,0
are all the same as far as ForcePal is concerned, but only the last is very
readable. What will cause problems